﻿<Window x:Class="XQueryConsole.SearchPathDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:w="clr-namespace:XQueryConsole"
        Title="Directories" Height="350" Width="400" ResizeMode="NoResize" 
        TextOptions.TextFormattingMode="Display"
        ShowInTaskbar="False" WindowStartupLocation="CenterOwner" Loaded="Window_Loaded">
    <Grid Margin="3,2,5,0">
        <Grid.RowDefinitions>
            <RowDefinition Height="*"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
        </Grid.RowDefinitions>
        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition></ColumnDefinition>
                <ColumnDefinition Width="Auto"></ColumnDefinition>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"></RowDefinition>
                <RowDefinition Height="*"></RowDefinition>
            </Grid.RowDefinitions>
            <Label Grid.Column="0" Grid.Row="0">Ordered list of search paths:</Label>
            <ListBox Name="pathListBox"  Grid.Column="0" Grid.Row="1" Margin="5,0,0,0"
                     SelectionChanged="pathListBox_SelectionChanged">                
            </ListBox>
            <StackPanel Orientation="Vertical" Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" 
                        VerticalAlignment="Center" Margin="10,10,3,0">
                <Button Name="btnUp"  Width="23" Height="23" Focusable="False" Click="btnUp_Click">
                    <Image Source="/XQueryConsole;component/Images/btnUp.png"></Image>
                </Button>
                <Button Name="btnDown" Width="23" Height="23" Focusable="False" Margin="0,2,0,0" Click="btnDown_Click">
                    <Image Source="/XQueryConsole;component/Images/btnDown.png"></Image>
                </Button>
            </StackPanel>
        </Grid>
        <StackPanel Grid.Row="1" Orientation="Vertical">
            <Label>Greyed items denote invalid path.</Label>
            <StackPanel Orientation="Horizontal">
                <TextBox Name="currentPath" Margin="5,0,0,0" Width="320" TextChanged="currentPath_TextChanged"></TextBox>
                <Button Width="24" Name="btnBrowse" Click="btnBrowse_Click">
                    <TextBlock FontWeight="Bold">...</TextBlock>
                </Button>
            </StackPanel>
        </StackPanel>
        <StackPanel Grid.Row="2" Orientation="Horizontal"
                    Margin="0,8,0,8">
            <Button Name="btnReplace"  Width="70" Margin="5,0,5,0" Click="btnReplace_Click">Replace</Button>
            <Button Name="btnAdd"  Width="70" Margin="5,0,5,0" Click="btnAdd_Click">Add</Button>
            <Button Name="btnDelete" Width="70" Margin="5,0,5,0" Click="btnDelete_Click">Delete</Button>
            <Button Name="btnCheck"  Margin="5,0,5,0" Width="125" Click="btnCheck_Click">Delete Invalid Paths</Button>
        </StackPanel>
        <Separator Grid.Row="4" Margin="6,0,0,2" Height="3"></Separator>
        <StackPanel Grid.Row="5" Orientation="Horizontal" 
                    HorizontalAlignment="Right" Margin="0,5,0,10">
            <Button Width="80" IsDefault="True" Click="Button_Click">OK</Button>
            <Button Width="80" IsCancel="True" Margin="5,0,0,0">Cancel</Button>
        </StackPanel>
    </Grid>
</Window>
